/*
 * Win32.cpp
 *
 *  Created on: Oct 16, 2012
 *      Author: tony
 */

#include "Win32.h"
#include <windows.h>

Win32::Win32()
{
}

Win32::~Win32()
{
}

void Win32::GetErrorString( int error , string& error_string)
{
	LPTSTR buffer[ERROR_STRING_BUFFER_SIZE];

	DWORD result = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM, 0, 10023, 0, (LPTSTR)&buffer, ERROR_STRING_BUFFER_SIZE,0);
	if( result > 0 )
	{
		error_string = string((LPTSTR)buffer);
	}
	else
	{
		error_string = string("[No Error String]");
	}
}
